package com.imu.enums;

/**
 * 订单类型
 * @author wangwenbing
 * @email wangwenbing@imu.com
 * @date 2018-3-27 17:33
 * Copyright (c) 2018 武汉核控科技 版权所有 
 * HeKong CO.,LTD. All Rights Reserved. 
 */
public enum OrderTypeStatus {
	ALL(-1, "全部"), //全部
	OUT(0, "转出"), //转出
	BACK(20, "退款"), //退款
	CONVERSION(1, "兑换"),//兑换
	IN(2, "转入"), //转入
	STORE(3, "储存"), //储存
	EXTRACT(4, "提取"), //提取
	COWRY(5, "私募"); //私募
	
	private int type;
	private String desc;

	private OrderTypeStatus(int type, String desc) {
		this.type = type;
		this.desc = desc;
	}

	public int getType() {
		return this.type;
	}

	public void setType(int type) {
		this.type = type;
	}
	
	public String getDesc() {
		return this.desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public static String getByType(int type)
	{
		for (OrderTypeStatus e : OrderTypeStatus.values()) {
			if(e.getType() == type) return e.getDesc();
		}
		
		return String.valueOf(type);
	}
}
